<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>상해진단서</title>
<script src="resources/js/jquery-1.6.4.min.js"></script>
<script src="resources/js/jquery.PrintArea.js_4.js"></script>
<script src="resources/js/jquery.printElement.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#printBtn").click(function(){
		$("#sanghaejindan").printElement({
			printMode: 'popup', 
			pageTitle:'sanghaejindanseo.jsp', 
			overrideElementCSS:['<c:url value="resources/css/office/sanghaejindanseo.css"/>', { href:'<c:url value="resources/css/office/sanghaejindanseo.css"/>',media:'print' }],
			leaveOpen:false 
		});
	});
});

//파일 이름 지정해서 엑셀 저장	
$("#btnExcel").live("click", function () {
    var a = document.createElement('a');
    var data_type = 'data:application/vnd.ms-excel';
    var table_html = encodeURIComponent($("#sanghaejindan").html());
    a.href = data_type + ', ' + table_html;
    a.download = '${patient.name}[${cheobangall.JUPSOO_DATE}].xls';
    
    a.click();
    e.preventDefault();
});

</script>

</head>
<body>
<div>
	<img alt="" class="printBtn" style="width:60px;height:60px; margin-top: 13px;" src="resources/images/officeword[black].png" id="btnExcel">
	<img alt="" src="resources/images/print-icon.jpg" class="printBtn" id="printBtn">
	<a href="cheobang.do"><img alt="" src="resources/images/xbutton.png" class="xBtn" id="close"></a>
</div>
<div id='jindandiv'>
<h2>상 해 진 단 서</h2>
<table id="sanghaejindan">
<tr id="j1"><th rowspan="2" class="b1">환자</th><th class="b1" >성명</th><td colspan="2">김상진</td><td class="b1">성별</td><td>M</td><td class="b1">생년월일</td><td>2001-..</td></tr>
<tr id="j2"><th class="b1">주소</th><td colspan="2">주소1/주소2</td><td class="b1" colspan="2">전화</td><td colspan="2">전화1전화2</td></tr>
<tr><th class="b1">질병명</th><td colspan="3">25</td><td class="b1" colspan="2">질병번호</td><td colspan="2">p1231</td></tr>
<tr><th class="b1">상해년월일</th><td colspan="3">년월일</td><td class="b1" colspan="2">진단일</td><td colspan="2">67</td></tr>
<tr><th class="b1">상해의원인</th><td colspan="7">27</td></tr>
<tr><th rowspan="4" class="b1">상해에대한소견</th><td class="b1">진료 경과 의견</td><td colspan="6">37</td></tr>
<tr><td class="b1">입 원 여 부</td><td colspan="6">37</td></tr>
<tr><td class="b1">식사가능여부</td><td colspan="6">37</td></tr>
<tr><td class="b1">외과적수술여부</td><td colspan="6">37</td></tr>
<tr><th class="b1">예상치료기간</th><td colspan="7">237</td></tr>
<tr><th class="b1" >향후치료에대한의견</th><td class="b1">향후치료의견</td><td colspan="6">37</td></tr>
<tr><th class="b1">비고</th><td colspan="7">27</td></tr>
<tr><td colspan="8" class='content'>위와같은사실어쩌고저쩌고</td></tr>

</table>
</div>
</body>
</html>